﻿<%@ Page Title="" Language="C#" MasterPageFile="~/User/UC2.master" AutoEventWireup="true" CodeFile="UC2Profile.aspx.cs" Inherits="User_UC2Profile" ValidateRequest="false" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" Runat="Server">
    <script src="../js/lib/jquery1.4.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function ()
        {
            if ($("#dv").length > 0)
            {
                var dv = $("#dv");
                $("#province").val(dv.attr("pr"));
                cityResult(dv.attr("ct"));
                var st = dv.attr("st").split(',');
                var j = 0;
                $("input[name='SalesType']").each(function (i)
                {
                    if ($(this).val() == st[j])
                    {
                        this.checked = true;
                        j++;
                        if (j > st.length) return;
                    }
                });
                if ($("#tbxCompanyType1").val() == dv.attr("cty"))
                    $("#tbxCompanyType1").attr("checked", "checked");
            }
        });
        function cityResult(d)
        {
            $.post("/XHR/city.ashx", { "c": $("#province").val() }, function (data)
            {
                if (data.length > 0)
                {
                    $("#city").html(data);
                    if (d) $("#city").val(d);
                }
            }
        );
        }
        String.prototype.trim = function (s)
        {
            if (s) return this.replace(s, "").replace(/(^\s*)|(\s*$)/g, "");
            return this.replace(/(^\s*)|(\s*$)/g, "");
        }
        function checkSub(theForm)
        {
            var ps = theForm.getElementsByTagName("input");
            for (var i = 0; i < ps.length; i++)
            {
                var p = ps[i];
                if (p.getAttribute("NotNull"))
                {
                    if (p.value.trim().length == 0)
                    {
                        s = p.parentNode.previousSibling;
                        if (s.nodeType == 3) s = s.previousSibling;
                        return SubMsg("请填写" + s.innerHTML.trim('：') + "！", p);
                    }
                    if (p.id == "ctl00$cphMain$tbxEmail" && reg(p.value, /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/))
                    {
                        return SubMsg("Email格式不正确！", $("#tbxEmail"));
                    }
                }
            }
            var cs = 0;
            $("input[name='SalesType']").each(function (i)
            {
                if (this.checked) cs++;
            });
            if (cs == 0) return SubMsg("您未选择经营类别");
            if (cs > 3) return SubMsg("经营类别最多只能选择三种！");
            var aa = FCKeditorAPI.GetInstance('<%=this.tbxCompanyAbout.ClientID%>').GetHTML();
            if (aa.trim() == 0)
            {
                return SubMsg("请填写企业简介！", $("#tbxCompanyAbout"));
            }
            $("#companyabout").val(aa);
            return true;
        }
        function reg(s, patrn)
        {
            return !patrn.test(s)
        }
        function SubMsg(msg, p)
        {
            alert(msg);
            if(p) p.focus();
            return false;
        }
    </script>
    <div class="userright">
<DIV class="title">企业信息管理</DIV>
<table width="96%" border="0" align="center" cellpadding="0" cellspacing="0" class="maintop">
  <tr>
    <td height="38" align="left" class="usertitle">公司基本资料</td>
  </tr>
  <tr>
    <td><table width="96%" border="0" cellspacing="0" cellpadding="0">
    </table></td>
  </tr>
</table>
        <form action="?act=l" method="post" onsubmit="return checkSub(this)">
        <table width="96%" border="0" align="center" cellpadding="0" cellspacing="0" class="edit_profile">
            <tbody>
                <tr>
                    <td width="13%" valign="middle">
                        企业名称：<asp:Literal ID="Literal1" runat="server"></asp:Literal>
                    </td>
                    <td width="87%" valign="middle">
                        <input name="tbxCompanyName" id="tbxCompanyName" runat="server" type="text" class="must"
                            size="40" notnull="1" />
                        <span>* </span>
                    </td>
                </tr>
                <tr>
                    <td valign="middle">
                        企业性质：
                    </td>
                    <td valign="middle">
                        <span>
                            <input type="radio" value="生产型" id="tbxCompanyType2" name="tbxCompanyType" checked="checked" />生产型
                            <input type="radio" value="国内总代" id="tbxCompanyType1" name="tbxCompanyType" />国内总代</span>
                    </td>
                </tr>
                <tr>
                    <td valign="middle">
                        注册资本：
                    </td>
                    <td valign="middle">
                        <input type="text" class="must" size="6" id="tbxRegisteredCapital" name="tbxRegisteredCapital"
                            runat="server" />
                        万元
                    </td>
                </tr>
                <tr>
                    <td valign="middle">
                        所在地区：
                    </td>
                    <td valign="middle">
                        <select id="province" name="province" onchange="cityResult();">
                            <option value="1">北京</option>
                            <option value="2">天津</option>
                            <option value="3">河北</option>
                            <option value="4">山西</option>
                            <option value="5">内蒙</option>
                            <option value="6">辽宁</option>
                            <option value="7">吉林</option>
                            <option value="8">黑龙江</option>
                            <option value="9">上海</option>
                            <option value="10">江苏</option>
                            <option value="11">浙江</option>
                            <option value="12">安徽</option>
                            <option value="13">福建</option>
                            <option value="14">江西</option>
                            <option value="15">山东</option>
                            <option value="16">河南</option>
                            <option value="17">湖北</option>
                            <option value="18">湖南</option>
                            <option value="19">广东</option>
                            <option value="20">广西</option>
                            <option value="21">海南</option>
                            <option value="22">重庆</option>
                            <option value="23">四川</option>
                            <option value="24">贵州</option>
                            <option value="25">云南</option>
                            <option value="26">西藏</option>
                            <option value="27">陕西</option>
                            <option value="28">甘肃</option>
                            <option value="29">青海</option>
                            <option value="30">宁夏</option>
                            <option value="31">新疆</option>
                            <option value="32">台湾</option>
                            <option value="33">香港</option>
                            <option value="34">澳门</option>
                        </select>
                        <select id="city" name="city">
                            <option value="374">北京市</option>
                        </select>
                        <span class="redxin">*</span>
                    </td>
                </tr>
                <tr>
                    <td valign="middle">
                        成立年份：
                    </td>
                    <td valign="middle">
                        <input type="text" id="tbxBuildYear" name="tbxBuildYear" runat="server" />(如：2000）
                    </td>
                </tr>
                <tr>
                    <td rowspan="2" valign="top">
                        经营类别：
                    </td>
                    <td valign="middle">
                        <div class="jinyinlb">
                            <div class="jinyikuan">
                                <input name="SalesType" type="checkbox" value="广告促销礼品" /></div>
                            <div class="jinyitext">
                                广告促销礼品</div>
                        </div>
                        <div class="jinyinlb">
                            <div class="jinyikuan">
                                <input name="SalesType" type="checkbox" value="数码电子礼品" />
                            </div>
                            <div class="jinyitext">
                                数码电子礼品</div>
                        </div>
                        <div class="jinyinlb">
                            <div class="jinyikuan">
                                <input name="SalesType" type="checkbox" value="茶具杯壶礼品" />
                            </div>
                            <div class="jinyitext">
                                茶具杯壶礼品</div>
                        </div>
                        <div class="jinyinlb">
                            <div class="jinyikuan">
                                <input name="SalesType" type="checkbox" value="家居生活礼品" />
                            </div>
                            <div class="jinyitext">
                                家居生活礼品</div>
                        </div>
                        <div class="jinyinlb">
                            <div class="jinyikuan">
                                <input name="SalesType" type="checkbox" value="生活电器礼品" /></div>
                            <div class="jinyitext">
                                生活电器礼品</div>
                        </div>
                        <div class="jinyinlb">
                            <div class="jinyikuan">
                                <input name="SalesType" type="checkbox" value="五金工具礼品" />
                            </div>
                            <div class="jinyitext">
                                五金工具礼品</div>
                        </div>
                        <div class="jinyinlb">
                            <div class="jinyikuan">
                                <input name="SalesType" type="checkbox" value="商务办公礼品" />
                            </div>
                            <div class="jinyitext">
                                商务办公礼品</div>
                        </div>
                        <div class="jinyinlb">
                            <div class="jinyikuan">
                                <input name="SalesType" type="checkbox" value="箱包皮具礼品" />
                            </div>
                            <div class="jinyitext">
                                箱包皮具礼品</div>
                        </div>
                        <div class="jinyinlb">
                            <div class="jinyikuan">
                                <input name="SalesType" type="checkbox" value="运动户外礼品" /></div>
                            <div class="jinyitext">
                                运动户外礼品</div>
                        </div>
                        <div class="jinyinlb">
                            <div class="jinyikuan">
                                <input name="SalesType" type="checkbox" value="工艺收藏礼品" />
                            </div>
                            <div class="jinyitext">
                                工艺收藏礼品</div>
                        </div>
                        <div class="jinyinlb">
                            <div class="jinyikuan">
                                <input name="SalesType" type="checkbox" value="食品/特产礼品" />
                            </div>
                            <div class="jinyitext">
                                食品/特产礼品</div>
                        </div>
                        <div class="jinyinlb">
                            <div class="jinyikuan">
                                <input name="SalesType" type="checkbox" value="印刷/包装礼品" />
                            </div>
                            <div class="jinyitext">
                                印刷/包装礼品</div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td valign="middle" class="jinyitext1">
                        （最多可选三种）
                    </td>
                </tr>
                <tr>
                    <td valign="middle">
                        主营产品：
                    </td>
                    <td valign="middle">
                        <input name="tbxSalesItem" id="tbxSalesItem" runat="server" type="text" class="must"
                            size="75" notnull="1" />
                        <span>* </span>(多个请用逗号隔开)
                    </td>
                </tr>
                <tr>
                    <td height="154" colspan="2">
                     公司简介：
                            <FCKeditorV2:FCKeditor ID="tbxCompanyAbout" runat="server" BasePath="~/fckeditor/" Height="460px"></FCKeditorV2:FCKeditor><span>* </span>
                            <input type="hidden" id="companyabout" name="companyabout" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <input type="submit" name="Submit" value=" 确 认 " />
                    </td>
                </tr>
            </tbody>
        </table>
        </form>



<table width="96%" border="0" align="center" cellpadding="0" cellspacing="0" class="maintop">
  <tr>
    <td height="38" align="left" class="usertitle">联系方式</td>
  </tr>
  <tr>
    <td><table width="96%" border="0" cellspacing="0" cellpadding="0">
    </table></td>
  </tr>
</table>
        <form action="?act=t" method="post" onsubmit="return checkSub(this)">
        <table width="96%" border="0" align="center" cellpadding="0" cellspacing="0" class="edit_profile">
            <tbody>
                <tr>
                    <th>
                        联系人：
                    </th>
                    <td>
                        <input class="must" name="tbxContactPerson" type="text" id="tbxContactPerson" notnull="1"
                            runat="server" /><span>* </span>
                    </td>
                </tr>
                <tr>
                    <th>
                        固定电话：
                    </th>
                    <td>
                        <input class="must" name="tbxTel" type="text" id="tbxTel" notnull="1" runat="server" /><span>*
                        </span>
                    </td>
                </tr>
                <tr>
                    <th>
                        部门：
                    </th>
                    <td>
                        <input class="must" name="tbxDeptName" type="text" id="tbxDeptName" runat="server"
                            size="12" />
                    </td>
                </tr>
                <tr>
                    <th>
                        职位：
                    </th>
                    <td>
                        <input class="must" name="tbxUserPosition" type="text" id="tbxUserPosition" runat="server"
                            size="12" />
                    </td>
                </tr>
                <tr>
                    <th>
                        传真：
                    </th>
                    <td>
                        <input class="must" name="tbxFax" type="text" id="tbxFax" runat="server" />
                    </td>
                </tr>
                <tr>
                    <th>
                        手机：
                    </th>
                    <td>
                        <input class="must" name="tbxMobile" type="text" id="tbxMobile" runat="server" />
                    </td>
                </tr>
                <tr>
                    <th>
                        QQ：
                    </th>
                    <td>
                        <input class="must" name="tbxQQ" type="text" id="tbxQQ" runat="server" />
                    </td>
                </tr>
                <tr>
                    <th>
                        Email：
                    </th>
                    <td>
                        <input class="must" name="tbxEmail" type="text" id="tbxEmail" notnull="1" runat="server" /><span>*
                        </span>
                    </td>
                </tr>
                <tr>
                    <th>
                        公司网址：
                    </th>
                    <td>
                        <input class="must" name="tbxWebsite" type="text" id="tbxWebsite" runat="server" />
                    </td>
                </tr>
                <tr>
                    <th>
                        联系地址：
                    </th>
                    <td>
                        <input class="must" name="tbxCompanyAddress" style="width: 400px;" type="text" id="tbxCompanyAddress"
                            notnull="1" runat="server" /><span>* </span>
                    </td>
                </tr>
                <tr>
                    <td height="154" valign="top">
                        &nbsp;
                    </td>
                    <td>
                        <input type="submit" name="Submit2" value=" 确 认 " />
                    </td>
                </tr>
            </tbody>
        </table>
        </form>
</div>
</asp:Content>

